(define (cube-root x)
  (cube-root-iter 1.0 x)
  )

(define (cube-root-iter guess x)
  (if (good-enough? guess (improve guess x))
   (improve guess x)
   (cube-root-iter (improve guess x)
                   x)))

(define (good-enough? guess new-guess)
  (< (abs (- new-guess guess))
     (* 0.0001 guess)))

(define (improve guess x)
  (/ (+ (/ x (* guess guess)) (* 2 guess)) 3) 
  )
